package com.yango.teach.client;

import com.yango.commonutil.result.Result;
import com.yango.teach.client.impl.VodFileClientImpl;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Li.Ding.yin
 * @create 2021年07月29日15:52-星期四
 * @role 服务调用接口
 */
@FeignClient(name = "server-vod", fallback = VodFileClientImpl.class)
@Component
public interface VodClient {

    //删除云端视频
    @ApiOperation(value = "删除云端视频")
    @DeleteMapping("/vod/video/removeVideo/{videoId}")
    public Result removeVideo(@ApiParam(name = "videoId", value = "视频id", required = true)
                              @PathVariable("videoId") String videoId);

    //根据id批量删除视频
    @ApiOperation(value = "根据id批量删除视频")
    @DeleteMapping("/vod/video/removeVideoByIds")
    public Result removeVideoByIds(@ApiParam(name = "videoIdList", value = "视频id集合", required = true)
                                   @RequestParam("videoIdList") List<String> videoIdList);
}
